<%= search_form_for(@q, class: 'form', role: 'form') do |f| %>
    <div class="row">
        <div class="form-group col-xs-6">
            <div class="col-sm-3">
                <%= f.label :valid_from_gteq, '有效时间起', class: 'control-label' %>
            </div>
            <div class="col-sm-6">
                <%= f.search_field :valid_from_gteq, class: 'form-control datetimepicker' %>
            </div>
        </div>
        <div class="form-group col-xs-6">
            <div class="col-sm-3">
                <%= f.label :valid_till_lteq, '有效时间止', class: 'control-label' %>
            </div>
            <div class="col-sm-6">
                <%= f.search_field :valid_till_lteq, class: 'form-control datetimepicker' %>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="form-group col-xs-6">
            <div class="col-sm-3">
                <%= f.label :applicable_type_eq, '适用对象', class: 'control-label' %>
            </div>
            <div class="col-sm-6">
                <%= f.select :applicable_type_eq, {'全部' => nil}.merge(voucher_applicable_type_hash.invert), {}, class: 'form-control' %>
            </div>
        </div>
        <div class="form-group col-xs-6">
            <div class="col-sm-3">
                <%= f.label :status_eq, '状态', class: 'control-label' %>
            </div>
            <div class="col-sm-6">
                <%= f.select :status_eq, {'全部' => nil, '生效' => Member::VoucherMeta::ACTIVE, '失效' => Member::VoucherMeta::INACTIVE}, {}, class: 'form-control', placeholder: '请输入商户号' %>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="form-group col-xs-6">
            <div class="col-sm-3">
                <%= f.label :issuer_type_eq, '发行方类别', class: 'control-label' %>
            </div>
            <div class="col-sm-6">
                <%= f.select :issuer_type_eq, {'全部' => nil}.merge(hash_voucher_type.invert), {}, class: 'form-control' %>
            </div>
        </div>
        <div class="form-group col-xs-6">
            <div class="col-sm-3">
                <%= f.label :issuer_name, '发行方名称', class: 'control-label' %>
            </div>
            <div class="col-sm-6">
                <%= f.search_field :issuer_name, class: 'form-control' %>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="form-group col-xs-6">
            <div class="col-sm-3">
                <%= f.label :settler_type_eq, '结算方类别', class: 'control-label' %>
            </div>
            <div class="col-sm-6">
                <%= f.select :settler_type_eq, {'全部' => nil}.merge(hash_voucher_type.invert), {}, class: 'form-control' %>
            </div>
        </div>
        <div class="form-group col-xs-6">
            <div class="col-sm-3">
                <%= f.label :settler_name, '结算方名称', class: 'control-label' %>
            </div>
            <div class="col-sm-6">
                <%= f.search_field :settler_name, class: 'form-control' %>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="form-group col-xs-6">
            <div class="col-sm-3">
                <%= f.label :code_eq, '红包代码', class: 'control-label' %>
            </div>
            <div class="col-sm-6">
                <%= f.search_field :code_eq, class: 'form-control' %>
            </div>
        </div>
    </div>
<% end %>